home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
UTIL
/
MEMORY
/
OLD
/
MEM208SRC
/
FSLib
/
c
/
ticker
< prev
next >
Wrap
Text File
|
1993-08-22
|
954b
|
45 lines
/* Original code (c) Acorn Computers Ltd, 1992-3 */
/* $Id: c.ticker 2.3 92/10/26 23:37:49 bdb Exp Locker: bdb $ */
#include "kernel.h"
#include "swis.h"
#include "_swis.h"
#include "modulewrap.h"
#include "ticker.h"
void setcallafter(void *private_word)
{
_kernel_swi_regs r;
r.r[0] = tickerperiod;
r.r[1] = (int)&callafter;
r.r[2] = (int)private_word;
if (enableticking)
_kernel_swi(OS_CallAfter,&r,&r);
}
void killticking(void *private_word)
{
enableticking=0;
_swix(OS_RemoveTickerEvent,_IN(0)|_IN(1),&callafter,private_word);
dropper();
}
RETURNMETHOD callback_handler( _kernel_swi_regs *r, void *private_word )
{ r=r;
ticker();
setcallafter(private_word);
return VIAR14;
}
RETURNMETHOD callafter_handler( _kernel_swi_regs *r, void *private_word )
{ _kernel_swi_regs k;
r=r;
if (enableticking)
{ k.r[0]=(int)&callback;
k.r[1]=(int)private_word;
_kernel_swi(OS_AddCallBack,&k,&k);
}
return VIAR14;
}